# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gfold
pkgver=4.4.1
pkgrel=0
pkgdesc="CLI tool to help keep track of Git repositories"
url="https://github.com/nickgerace/gfold"
license="Apache-2.0"
arch="all"
makedepends="cargo cargo-auditable"
options="net"
source="https://github.com/nickgerace/gfold/archive/$pkgver/gfold-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	git init # needed for the integration test
	cargo test --frozen --workspace
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
46066d2455e3a25108157af04dcd253d4c62a43299c8388407d3bc1a753b8ae183b7e5ebf11294e37078563a237fd7177062d611a8111507e49caa78ea3b72eb  gfold-4.4.1.tar.gz
"
